<html>
<head><meta charset="utf-8"><title>The duplication in json · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html">The duplication in json</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220969264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/220969264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#220969264">(Dec 26 2020 at 16:00)</a>:</h4>
<p>/me is looking into <a href="#narrow/stream/266220-rustdoc/topic/Panic.20in.20json-format/near/218956967">this</a> <a href="https://github.com/rust-lang/rust/blob/1f5beec3b111560be181283009ef96da6ac5e7a7/src/librustdoc/json/mod.rs#L164-L165">duplication</a></p>



<a name="220970388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/220970388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#220970388">(Dec 26 2020 at 16:35)</a>:</h4>
<p><a href="https://github.com/aDotInTheVoid/rust/tree/dbg-rdj-dube">this branch</a> fixes the test suite, but panics on <a href="https://github.com/rust-lang/regex">regex</a></p>



<a name="220973977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/220973977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#220973977">(Dec 26 2020 at 18:26)</a>:</h4>
<p>Welp, <a href="https://github.com/aDotInTheVoid/rust/blob/dbg-rdj-dube/slog">more debuging</a> (I can explain the format if you want) has shown duplicate calls arn't coming from item, but outside.</p>
<p>This leaves 2 questions:</p>
<ol>
<li>Does this happen in html,</li>
<li>What does the regex crate do that isn't in the test suite (could be alot, json suite is sparce)</li>
</ol>



<a name="220974918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/220974918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#220974918">(Dec 26 2020 at 18:55)</a>:</h4>
<p>Further update, <a href="https://github.com/aDotInTheVoid/rust/blob/dbg-rdj-dube/slog_html">duplication in html</a></p>



<a name="221085887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221085887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221085887">(Dec 28 2020 at 19:37)</a>:</h4>
<p>Update: Trying to run <code>rustdoc-json</code> tests on the <code>rustdoc</code> suite gives a bunch of interesting errors</p>



<a name="221087322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221087322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221087322">(Dec 28 2020 at 20:01)</a>:</h4>
<p>It looks like the common link is <code>pub use</code>.</p>



<a name="221087857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221087857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221087857">(Dec 28 2020 at 20:09)</a>:</h4>
<p><span class="user-mention" data-user-id="268539">@Nixon Enraght-Moony</span> are they struct imports? take a look at <a href="https://github.com/rust-lang/rust/pull/80300#discussion_r549014404">https://github.com/rust-lang/rust/pull/80300#discussion_r549014404</a></p>



<a name="221089847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221089847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221089847">(Dec 28 2020 at 20:41)</a>:</h4>
<p>It's not the ctor, I think</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">mod</span> <span class="nn">inner</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Inner</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">pub</span><span class="w"> </span><span class="n">foo</span>: <span class="kt">i32</span>
    <span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>


<span class="k">pub</span><span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">inner</span>::<span class="n">Inner</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Outer</span><span class="p">;</span><span class="w"></span>
</code></pre></div>
<div class="codehilite"><pre><span></span><code>thread &#39;rustc&#39; panicked at &#39;assertion failed: `(left == right)`
  left: `Item {
    id: Id(&quot;0:4&quot;),
    crate_id: 0,
    name: Some(&quot;Inner&quot;),
    source: Some(Span {
        filename: &quot;/home/nixon/upstreams/rust/rust/src/test/rustdoc-json/my.rs&quot;,
        begin: (2, 4),
        end: (4, 5),
    }),
    visibility: Public,
    docs: &quot;&quot;,
    links: {},
    attrs: [],
    deprecation: None,
    kind: Struct,
    inner: StructItem(Struct {
        struct_type: Plain,
        generics: Generics {
            params: [],
            where_predicates: [],
        },
        fields_stripped: false,
        fields: [Id(&quot;0:5&quot;)],
        impls: [Id(&quot;0:9&quot;), Id(&quot;0:10&quot;), Id(&quot;0:11&quot;), Id(&quot;0:13&quot;), Id(&quot;0:14&quot;)],
    }),
};
`,
 right: `Item {
    id: Id(&quot;0:4&quot;),
    crate_id: 0,
    name: Some(&quot;Outer&quot;),
    source: Some(Span {
        filename: &quot;/home/nixon/upstreams/rust/rust/src/test/rustdoc-json/my.rs&quot;,
        begin: (2, 4),
        end: (4, 5),
    }),
    visibility: Public,
    docs: &quot;&quot;,
    links: {},
    attrs: [],
    deprecation: None,
    kind: Struct,
    inner: StructItem(Struct {
        struct_type: Plain,
        generics: Generics {
            params: [],
            where_predicates: [],
        },
        fields_stripped: false,
        fields: [Id(&quot;0:5&quot;)],
        impls: [Id(&quot;0:9&quot;), Id(&quot;0:10&quot;), Id(&quot;0:11&quot;), Id(&quot;0:13&quot;), Id(&quot;0:14&quot;)],
    }),
}`&#39;, src/librustdoc/json/mod.rs:171:17
</code></pre></div>



<a name="221096878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221096878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221096878">(Dec 28 2020 at 22:40)</a>:</h4>
<p>hmm, ok</p>



<a name="221096879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221096879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221096879">(Dec 28 2020 at 22:40)</a>:</h4>
<p>very strange</p>



<a name="221472682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221472682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nixon Enraght-Moony <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221472682">(Jan 03 2021 at 21:44)</a>:</h4>
<p>Oppened as <a href="https://github.com/rust-lang/rust/issues/80664">#80664</a>. Your comment about uniqueness of _definition_ vs _accesabilty_ was right on the money.</p>



<a name="221473065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221473065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221473065">(Jan 03 2021 at 21:52)</a>:</h4>
<p>nice <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="221473066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/The%20duplication%20in%20json/near/221473066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/The.20duplication.20in.20json.html#221473066">(Jan 03 2021 at 21:52)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/80664#issuecomment-753681341">https://github.com/rust-lang/rust/issues/80664#issuecomment-753681341</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>